<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动布局</title>
</head>
<style>
  .content {
    width: 200px;
    background-color: #ccc;
  }
  /* 清除浮动 */
  .content::after {
    content: '';
    display: block;
    clear: both;
  }
  .item {
    height: 50px;
    background-color: red;
    float: left;
    width: 50px;
  }
</style>
<body>
  <div class="content">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">2</div>
    <div class="item">2</div>
    <div class="item">2</div>
  </div>

  <div class="other">111111</div>
</body>
</html>